<?php
/* SVN FILE: $Id$ */

/**
 * Enter description here ....
 *
 * @filesource
 * @copyright    Copyright (c) 2006, .
 * @link
 * @package
 * @subpackage
 * @since
 * @version      $Revision$
 * @modifiedby   $LastChangedBy$
 * @lastmodified $Date$
 * @license      http://www.opensource.org/licenses/mit-license.php The MIT License
 */

/**
 * Computadores
 *
 * Enter description here...
 *
 * @package
 * @subpackage
 * @since
 */
class Computadores extends AppModel
{

    var $name = 'Computadores';
    var $useTable = 'computadores';
    var $primaryKey = 'co_computador';

    var $belongsTo  = array(

	    'Licencas' =>
		    array('className'  => 'Licencas',
			    'conditions' => '',
			    'order'      => '',
			    'foreignKey' => 'co_licenca'
		    ),

		'SisUsuarios' =>
		    array('className'  => 'SisUsuarios',
			    'conditions' => '',
			    'order'      => '',
			    'foreignKey' => 'co_user'
			),
		
	);
	
	var $hasMany = array(
	
		'Senhas' =>
			array('className'	=> 'Senhas',
				'conditions'	=> 'Senhas.ativa = "A"',
				'order'			=> 'Senhas.co_senha DESC',
				'foreignKey'	=> 'co_computador',
				'fields'		=> '',
				'limit'			=> '1',
				'offset'		=> '',
				'dependent'		=> '',
				'exclusive'		=> '',
				'finderQuery'	=> '',
				'counterQuery'	=> ''
			)
	);
}

?>